<?php 

namespace app\admin\widget;

/**
 * 后台相册相关小组键
 */
class Album{

    public function albumList(){
        $Album = M('album');
        $list = $Album->field('id,aname,status')->select();
        $html = '';
        foreach ($list as $v){
            $html .= '<li><a href="'.U('picture/index',['aid'=>$v['id']]).'"><span class="am-icon-puzzle-piece"></span> '.$v['aname'];
            if($v['status'] == '1'){
                $html .= '<span class="am-badge am-badge-secondary am-margin-right am-fr">公开</span>';
            }
            $html .= '</a></li>';
        }
        
        return $html;
    }

}